package com.baiduspring.web.dict;

import com.baiduspring.dict.ColumnChannelEnum;
import com.baiduspring.dict.ContentSourceEnum;
import com.baiduspring.dict.DictVO;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/dict")
@Scope(value = "prototype")
public class DictController {
    @GetMapping("/columnChannels")
    public List<DictVO<Integer, String>> columnChannels() {
        return ColumnChannelEnum.columnChannels().get();
    }

    @GetMapping("/contentSources")
    public List<DictVO<Integer, String>> contentSources() {
        return ContentSourceEnum.contentSources().get();
    }
}
